<!--选择名片页面-->
<template>
    <div class="selectCardWrap">
        <Head BackType1="1" title="选择朋友"></Head>
        <div class="friendSWrap">
            <div class="boundary"></div>
            <div class="newChat" @click="bindToFindMembers">
                <p>创建新的聊天</p>
                <img src="../assets/img/ArrowRight.png">
            </div>
            <p class="infoSec">最近聊天</p>
            <div class="allFriends">
                <div class="col" v-for="(item,index) in friends" @click="bindToSendCard">
                    <img src="../assets/img/messageAvatar.png">
                    <p>爱萝莉真是太好了</p>
                </div>
            </div>
        </div>
        <Card @sendCard="sendCard" :show="showCard" @cancel="cancle"></Card>
    </div>
</template>

<script>
    import Head from "../components/Head"
    import Card from "../components/Card"


    export default {
        data() {
            return {
                showCard: false,
                friends: 20,
                imgTxt:false //是否为转发图片
            }
        },
        components: {
            Head,
            Card
        },
        methods: {
            sendCard() {
                this.showCard = false;
            },
            bindToSendCard() {
                this.showCard = true;
            },
            cancle() {
                this.showCard = false;
            },
            bindToFindMembers(){
                this.$router.push("/findmembers");
            }
        }
    }
</script>

<style scoped lang="less">
    .selectCardWrap {
        position: relative;
        width: 100%;
        height: 100%;
        background-color: #ffffff;

        .friendSWrap {
            position: absolute;
            top: 88px;
            bottom: 0;
            width: 100%;

            .boundary {
                width: 100%;
                height: 11px;
                background-color: #f1f5f8;
            }

            .infoSec {
                width: 100%;
                padding: 19px 42px;
                box-sizing: border-box;
                font-size: 24px;
                font-family: PingFangSC-Regular;
                font-weight: 400;
                color: rgba(152, 151, 148, 1);
                background-color: #f1f5f8;
            }

            .newChat {
                display: flex;
                align-items: center;
                justify-content: space-between;
                padding: 0 34px 0 36px;
                box-sizing: border-box;
                width: 100%;
                height: 90px;
                background-color: #ffffff;

                p {
                    font-size: 32px;
                    font-family: PingFangSC-Regular;
                    font-weight: 400;
                    color: rgba(50, 50, 50, 1);
                }

                img {
                    width: 14px;
                    height: 22px;
                }
            }

            .allFriends {
                position: absolute;
                top: 163px;
                bottom: 0;
                width: 100%;
                padding-left: 40px;
                box-sizing: border-box;
                overflow-y: scroll;
                -webkit-overflow-scrolling: touch;

                .col {
                    width: 100%;
                    height: 130px;
                    display: flex;
                    align-items: center;
                    border-bottom: 1px solid #EEEEEE;

                    img {
                        width: 90px;
                        height: 90px;
                        border-radius: 50%;
                        margin-right: 21px;
                    }

                    p {
                        font-size: 28px;
                        font-family: PingFangSC-Regular;
                        font-weight: 400;
                        color: rgba(50, 50, 50, 1);
                    }
                }

            }

        }

    }
</style>
